<template>
  <div>
    <mt-header :title="headTitle" fixed>
      <div slot="left" v-if="showBack" @click="hideCurr">
        <mt-button icon="back"></mt-button>
      </div>
      <nuxt-link :to="{name:'yuyue-yuyueRecord'}" slot="right" v-if="showAdd">
        <mt-button icon="more"></mt-button>
      </nuxt-link>
    </mt-header>
  </div>
</template>

<script>
export default {
  props: ['headTitle', 'showBack', 'showAdd', 'bkParam', 'gotoPth'],
  methods: {
    hideCurr() {
      console.log(`bkParam的值：${this.bkParam}`);
      if (this.bkParam == 'hd') {
        this.$emit('hideCurr', false);
      }
      if (this.bkParam == 'bk' || this.bkParam == '' || this.bkParam == null || this.bkParam == undefined) {
        this.$router.back(-1);
      }
    },
  },
};
</script>

<style lang="stylus">
.mint-header-title
  font-size 1rem
</style>

